//
//  SecondView.m
//  HomeWork_10
//
//  Created by dllo on 16/3/22.
//  Copyright © 2016年 chen. All rights reserved.
//

#import "SecondView.h"
#import "MyLabel.h"
@interface SecondView ()
@property (nonatomic, retain) MyLabel *label;
@property (nonatomic ,retain) MyLabel *label1;
@end

@implementation SecondView
- (void)dealloc{
    [_name release];
    [_phoneNumber release];
    [_label release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"联系人";
    self.view.backgroundColor = [UIColor whiteColor];
    [self createSubView];
}

- (void)createSubView{
   UILabel *lablOfName = [[MyLabel alloc]initWithFrame:CGRectMake(20, 200, 100, 50)];
    lablOfName.text = @"Name:";
    [self.view addSubview:lablOfName];
    [lablOfName release];
    
    
    self.label = [[MyLabel alloc]initWithFrame:CGRectMake(200, 200, 200, 50)];
    [self.view addSubview:self.label];
    self.label.text = self.name;
    [_label release];
    
    UILabel *labelOfPhoneNumber = [[MyLabel alloc]initWithFrame:CGRectMake(20, 300, 150, 50)];
    labelOfPhoneNumber.text = @"PhoneNumber:";
    [self.view addSubview:labelOfPhoneNumber];
    [labelOfPhoneNumber release];
    
    self.label1 = [[MyLabel alloc]initWithFrame:CGRectMake(200, 300, 200, 50)];
    [self.view addSubview:self.label1];
    self.label1.text = self.phoneNumber;
    [_label1 release];
    
}













- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
